using System;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.DALFactory;
using OgilvyOne.IDAL;
using OgilvyOne.Model;
using System.Collections;

namespace OgilvyOne.BLL
{
    public class Member
    {
        // Methods
        public MemberInfo CheckLogin(string login_name, string password)
        {
            if ((login_name.Trim() == string.Empty) || (password.Trim() == string.Empty))
            {
                return null;
            }
            return OgilvyOne.DALFactory.Member.Create().CheckLogin(login_name, password);
        }

        public IList getMemberList(string isdel)
        {
            return OgilvyOne.DALFactory.Member.Create().getMemberList(isdel);
        }

        public IList getMemberList(string isdel, int memberid)
        {
            return OgilvyOne.DALFactory.Member.Create().getMemberList(isdel, memberid);
        }

        public void Insert(MemberInfo member)
        {
            if (member.LoginName.Trim() != string.Empty)
            {
                Console.Write(member.LoginName.Trim());
                OgilvyOne.DALFactory.Member.Create().Insert(member);
            }
        }

        public void Update(MemberInfo member)
        {
            if (member.LoginName.Trim() != string.Empty)
            {
                OgilvyOne.DALFactory.Member.Create().Update(member);
            }
        }

    }
}
